﻿using System.ComponentModel.DataAnnotations;
using WebApplication2.Attribute;

namespace WebApplication2.model
{
    public class TestMode :BaseModel
    {

        //[Required(ErrorMessage = "商品ID不得为空")]
        //[NoSpace(ErrorMessage = "不能是空格")]
        public string ProductId { get; set; }

        //[Required(ErrorMessage = "购买商品数量不得为空")]
        //[Range(1, 999, ErrorMessage = "购买商品数量必须介于1~999之间")]
        public int Number { get; set; } = 0;

        //[Required(ErrorMessage = "用户ID不得为空")]
        public string UserId { get; set; }
    }
}
